import cv2
image = cv2.imread("E:\opencv\opencv\sources\samples\data\lena.jpg")

grayImg = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
blurImg = cv2.GaussianBlur(grayImg,(5,5),0)
#dst = cv2.Canny(src,threshold1,threshold2[,sdges[,apertureSize[,L2gradient]]])
#threshold1、threshold2 这两个阈值用来连接断裂的边缘，小于threshold1的视为假边缘，大于threshold2的视为真边缘
#cannyImg = cv2.Canny(blurImg,60,140)
cannyImg2 = cv2.Canny(blurImg,50,150)

cv2.imshow('blurImg',blurImg)
#cv2.imshow('cannyImg',cannyImg)
cv2.imshow('cannyImg2',cannyImg2)

cv2.waitKey(0)